package com.yjz.study.ui.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.yjz.common.base.BaseFragment;
import com.yjz.study.R;

/**
 * 作用 :
 * 作者 : yjz
 * 时间 : 2024/10/15 16:45
 */
public class NormalFragment extends BaseFragment {

    public static Fragment newInstance(String title) {
        Bundle args = new Bundle();
        args.putString("title", title);
        NormalFragment fragment = new NormalFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_nomral;
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        TextView textView = view.findViewById(R.id.title);
        String string = getArguments().getString("title");
        textView.setText(string);
    }
}
